<html>
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>MixIO</title>
    <link rel="shortcut icon" href="img/shortcut.png"/>
    <!-- Custom fonts for this template-->
    <link rel="stylesheet" href="css/all.css">
    
        <!-- Bootstrap core JavaScript-->
    <script src="js/jquery.min.js"></script>
    <script src="js/lang.js"></script>
    <script src="js/farbtastic.js"></script>
    <script src="js/bootstrap.bundle.min.js"></script>

    <!-- Core plugin JavaScript-->
    <script src="js/jquery.easing.min.js"></script>

    <!-- Custom scripts for all pages-->
    <script src="js/echarts.min.js"></script>
    <script src="js/jquery.easyui.min.js"></script>
    <script src="js/mqtt.min.js"></script>
    <link rel="stylesheet" href="css/dataTables.bootstrap4.min.css">
    <link rel="stylesheet" href="css/flatpkr.css">
    <script src="js/jquery.dataTables.min.js"></script>
    <script src="js/flatpkr.js"></script>
    <script src="js/dataTables.bootstrap4.min.js"></script>
    <script src="js/tools.js"></script>
    <script src="js/data.js?v=6"></script>
</head>
<body id="page-top" class="sidebar-toggled">

    <!-- Page Wrapper -->
    <div id="wrapper">

        <!-- Sidebar -->
        <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">

            <!-- Sidebar - Brand -->
            <a class="sidebar-brand d-flex align-items-center justify-content-center">
                <div class="sidebar-brand-icon">
                    <img src="img/logo.png" style="width:35px" alt="">
                </div>
                <div class="sidebar-brand-text mx-3" >MixIO</div>
            </a>

            <!-- Divider -->
            <hr class="sidebar-divider my-0">

            

            <!-- Nav Item - Dashboard -->

            <!-- Divider -->
            <hr class="sidebar-divider">

            <!-- Heading -->
            <div class="sidebar-heading lang" key="MANAGE">
            </div>
            <li class="nav-item">
                <a class="nav-link" href="projects" id="manage_prj">
                    <i class="fa fa-fw fa-tachometer"></i>
                    <span class="lang" key="PROJECTSMANAGE"></span></a>
            </li>
            <li class="nav-item active">
                <a class="nav-link" href="mqttdata" id="manage_data">
                    <i class="fa fa-fw fa-table"></i>
                    <span class="lang" key="DATAMANAGE"></span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="tinydata" id="tiny_data">
                    <i class="fa fa-fw fa-database"></i>
                    <span>Tiny DB</span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="webapps" id="share_app">
                    <i class="fa fa-fw fa-share"></i>
                    <span class="lang" key="SHAREMANAGE"></span></a>
            </li>

            <hr class="sidebar-divider">
            <div class="sidebar-heading lang" key="SETTINGS">
            </div>
            <li class="nav-item">
                <a class="nav-link" href="logout">
                    <i class="fa fa-fw fa-arrow-circle-left"></i>
                    <span class="lang" key="LOGOUT"></span></a>
            </li>

           

            <!-- Divider -->
            <hr class="sidebar-divider d-none d-md-block">

            <!-- Sidebar Toggler (Sidebar) -->
            <div class="text-center d-none d-md-inline">
                <button class="rounded-circle border-0" id="sidebarToggle"></button>
            </div>

        </ul>
        <!-- End of Sidebar -->

        <!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

            <!-- Main Content -->
            <div id="content">

                <!-- Topbar -->
                <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow" style="display:flex;justify-content:space-between">
                    <div style="display:flex;align-items:center;justify-content:center">
                    <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
                            <i class="fa fa-bars"></i>
                        </button> 
                    <h1 class="d-sm-inline-block h3 mb-0 text-gray-800 lang" key="DATAMANAGE" style="margin-left:10px;font-size:1.5rem;display:inline-block;cursor:pointer"></h1>
                        
                </div>
                </nav>
                <div class="container-fluid" id="project_list">
                    <div class="row" style="display:flex;align-items:center;justify-content:center">
                        <div class="col-xl-4">
                            <div class="card shadow mb-4" style="border-radius:0px 0px 30px 30px;min-height:85px;margin-top:-1.5rem;box-shadow: 0 .75rem 1.75rem 0 rgba(58,59,69,.15)!important;border:0">
                                <div class="card-body" style="padding:0;display:flex;align-items:center;justify-content: center;">
                                    <a id="play" class="btn btn-success" style="margin:5px;font-size:0.8rem;cursor:pointer" onclick = "play()">
                                        <i class="fa fa-play" style="font-size:1.2rem"></i><br>
                                    </a>
                                    <a id="stop" class="btn btn-warning" style="margin:5px;font-size:0.8rem;cursor:pointer" onclick = "stop()">
                                        <i class="fa fa-pause" style="font-size:1.2rem"></i><br>
                                    </a>
                                    <a class="btn btn-info" style="margin:5px;font-size:0.8rem;cursor:pointer" onclick = "refresh()">
                                        <i class="fa fa-refresh" style="font-size:1.2rem"></i><br>
                                    </a>                                
                                </div>
                                <div class="card-body" style="padding-bottom:0;padding-top:0">
                                    <div class="">
                                        <h4 class="small font-weight-bold"><span class="lang" key="OFFLINECOUNT"></span><span class="float-right" id="prj_num"></span></h4>
                                        <div class="progress mb-4" style="margin-bottom:1rem!important">
                                            <div class="progress-bar bg-info" role="progressbar" id="prj_num_bar" style="width: 20%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="1000"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                    </div>
                    
                    <div class="row" >
                        
                        <div class="col-xl-6">
                            <div class="card shadow mb-4" style="border-radius:10px;min-height:660px">
                                <div style="position: absolute;right:20px;top:20px"  class="d-none d-md-block">
                                    <span></span><input id="topicFilter" placeholder="筛选主题" class="form-control form-control-sm" style="display:inline;width:100px;min-width:100px"></input>
                                    <span></span><input id="timeFilter" placeholder="筛选时间范围" class="form-control form-control-sm" style="display:inline;width:200px;min-width:200px"></input>
                                    <a class="btn btn-sm btn-primary" onclick="filter()"><i class="fa fa-filter"></i></a>
                                    <a class="btn btn-sm btn-primary" onclick="undo()"><i class="fa fa-undo"></i></a>
                                    <a class="btn btn-sm btn-primary" onclick="output()"><i class="fa fa-download"></i></a>
                                    <a class="btn btn-sm btn-danger" onclick="clearAll()"><i class="fa fa-trash"></i></a>
                                </div>
                                <div class="card-body" style="overflow:auto;">
                                    <table id="apps_table" class="table table-striped table-bordered" style="width:100%"> 
                                        <thead>
                                            <tr>
                                                <th class="lang" key="TOPIC"></th>
                                                <th class="lang" key="MESSAGE"></th>
                                                <th class="lang" key="TIME"></th>
                                            </tr>
                                        </thead>
                                        <tbody id="mqttdata">
    
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <div class="col-xl-6">
                            <div class="card shadow mb-4" style="border-radius:10px">
                                
                                <div class="card-body" style="overflow:auto;height:660px">
                                    <div id="chart" style="width:100%;height:100%">

                                    </div>
                                </div>
                            </div>
                        </div>
                       
                    </div>
                </div>
            </div>
            <footer class="sticky-footer bg-white">
            <div class="container my-auto">
                <div class="copyright text-center my-auto">
                    <a href="//mixly.org" target="_blank" class="d-none d-md-block" style="margin-right:30px;color:gray;font-size:0.7rem;user-select:none">
                        Copyright© Mixly Team @ BNU, CHINA
                    </a> 
                </div>
            </div>
    </footer>
        </div>
    
    <!-- End of Page Wrapper -->


    

    <!-- Page level custom scripts -->
    <script src="js/sb-admin-2.min.js?v=2"></script>
</body>

</html>